From 96f0763e3f86af23d47aaaaf760d521815a97b61 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Wed, 19 Sep 2012 09:26:26 +0200 Subject: [PATCH] x86/ACPI: fix error indication from acpi_parse_madt_lapic_entries() If the legacy APIC invocation of acpi_table_parse_madt() succeeds but the x2APIC counterpart fails, this is regarded as failure by the function, yet its return value would indicate success. Signed-off-by: Jan Beulich Acked-by: Keir Fraser --- xen/arch/x86/acpi/boot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 64c76f593f..e518e910fc 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -452,7 +452,7 @@ static int __init acpi_parse_madt_lapic_entries(void) } else if (count < 0 || x2count < 0) { printk(KERN_ERR PREFIX "Error parsing LAPIC entry\n"); /* TBD: Cleanup to allow fallback to MPS */ - return count; + return count < 0 ? count : x2count; } count = @@ -464,7 +464,7 @@ static int __init acpi_parse_madt_lapic_entries(void) if (count < 0 || x2count < 0) { printk(KERN_ERR PREFIX "Error parsing LAPIC NMI entry\n"); /* TBD: Cleanup to allow fallback to MPS */ - return count; + return count < 0 ? count : x2count; } return 0; } -- 2.30.2